class ToDo(object):
    num = 0
    @classmethod
    def next_id(cls):
        ToDo.num +=1
        return ToDo.num
    def __init__(self,title:str,id:int=0,completed=False):
        self.title = title
        self.id = id if id > 0 else ToDo.next_id()
        self.completed = completed


    def __str__(self):
        return "'title': {}, 'id': {}, 'completed': {}".format(self.title,self.id,self.completed)